import subprocess
import time

import uiautomation as auto
import os

# wd = auto.WindowControl(searchDepth=1, ClassName='#32770')
# wd.EditControl(AutomationId='emailInput').SendKeys('bttf.pdop.autotester01@morningstar.com')
# wd.EditControl(AutomationId='passwordInput').SendKeys('BttfTester2020')
# wd.ButtonControl(Name='Sign In').Click()
# print(wd.Name)
# print(wd.CaptureToImage("1.png"))
# exit()

wd = auto.WindowControl(ClassName='MstarAWDImportClass')
wd.SetTopmost(True)
wd.MoveToCenter()
time.sleep(4)
wd.Maximize()
# wd.ShowWindow(1)
# wd.SetActive()
# print(wd.Name)
# es = wd.EditControl()